3.2.5 \(\int (f+g x)^2 \sqrt {a+b \log (c (d+e x)^n)} \, dx\) [105]

Optimal. Leaf size=404 \[ -\frac {\sqrt {b} e^{-\frac {a}{b n}} (e f-d g)^2 \sqrt {n} \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{2 e^3}-\frac {\sqrt {b} e^{-\frac {2 a}{b n}} g (e f-d g) \sqrt {n} \sqrt {\frac {\pi }{2}} (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{2 e^3}-\frac {\sqrt {b} e^{-\frac {3 a}{b n}} g^2 \sqrt {n} \sqrt {\frac {\pi }{3}} (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{6 e^3}+\frac {(e f-d g)^2 (d+e x) \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g (e f-d g) (d+e x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g^2 (d+e x)^3 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{3 e^3} \]

[Out]

-1/18*g^2*(e*x+d)^3*erfi(3^(1/2)*(a+b*ln(c*(e*x+d)^n))^(1/2)/b^(1/2)/n^(1/2))*b^(1/2)*n^(1/2)*3^(1/2)*Pi^(1/2)
/e^3/exp(3*a/b/n)/((c*(e*x+d)^n)^(3/n))-1/4*g*(-d*g+e*f)*(e*x+d)^2*erfi(2^(1/2)*(a+b*ln(c*(e*x+d)^n))^(1/2)/b^
(1/2)/n^(1/2))*b^(1/2)*n^(1/2)*2^(1/2)*Pi^(1/2)/e^3/exp(2*a/b/n)/((c*(e*x+d)^n)^(2/n))-1/2*(-d*g+e*f)^2*(e*x+d
)*erfi((a+b*ln(c*(e*x+d)^n))^(1/2)/b^(1/2)/n^(1/2))*b^(1/2)*n^(1/2)*Pi^(1/2)/e^3/exp(a/b/n)/((c*(e*x+d)^n)^(1/
n))+(-d*g+e*f)^2*(e*x+d)*(a+b*ln(c*(e*x+d)^n))^(1/2)/e^3+g*(-d*g+e*f)*(e*x+d)^2*(a+b*ln(c*(e*x+d)^n))^(1/2)/e^
3+1/3*g^2*(e*x+d)^3*(a+b*ln(c*(e*x+d)^n))^(1/2)/e^3

________________________________________________________________________________________

Rubi [A]
time = 0.51, antiderivative size = 404, normalized size of antiderivative = 1.00, number of steps used = 17, number of rules used = 9, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {2448, 2436, 2333, 2337, 2211, 2235, 2437, 2342, 2347} \begin {gather*} -\frac {\sqrt {\frac {\pi }{2}} \sqrt {b} g \sqrt {n} e^{-\frac {2 a}{b n}} (d+e x)^2 (e f-d g) \left (c (d+e x)^n\right )^{-2/n} \text {Erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{2 e^3}-\frac {\sqrt {\pi } \sqrt {b} \sqrt {n} e^{-\frac {a}{b n}} (d+e x) (e f-d g)^2 \left (c (d+e x)^n\right )^{-1/n} \text {Erfi}\left (\frac {\sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{2 e^3}-\frac {\sqrt {\frac {\pi }{3}} \sqrt {b} g^2 \sqrt {n} e^{-\frac {3 a}{b n}} (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {Erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{6 e^3}+\frac {g (d+e x)^2 (e f-d g) \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {(d+e x) (e f-d g)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g^2 (d+e x)^3 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{3 e^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(f + g*x)^2*Sqrt[a + b*Log[c*(d + e*x)^n]],x]

[Out]

-1/2*(Sqrt[b]*(e*f - d*g)^2*Sqrt[n]*Sqrt[Pi]*(d + e*x)*Erfi[Sqrt[a + b*Log[c*(d + e*x)^n]]/(Sqrt[b]*Sqrt[n])])
/(e^3*E^(a/(b*n))*(c*(d + e*x)^n)^n^(-1)) - (Sqrt[b]*g*(e*f - d*g)*Sqrt[n]*Sqrt[Pi/2]*(d + e*x)^2*Erfi[(Sqrt[2
]*Sqrt[a + b*Log[c*(d + e*x)^n]])/(Sqrt[b]*Sqrt[n])])/(2*e^3*E^((2*a)/(b*n))*(c*(d + e*x)^n)^(2/n)) - (Sqrt[b]
*g^2*Sqrt[n]*Sqrt[Pi/3]*(d + e*x)^3*Erfi[(Sqrt[3]*Sqrt[a + b*Log[c*(d + e*x)^n]])/(Sqrt[b]*Sqrt[n])])/(6*e^3*E
^((3*a)/(b*n))*(c*(d + e*x)^n)^(3/n)) + ((e*f - d*g)^2*(d + e*x)*Sqrt[a + b*Log[c*(d + e*x)^n]])/e^3 + (g*(e*f
 - d*g)*(d + e*x)^2*Sqrt[a + b*Log[c*(d + e*x)^n]])/e^3 + (g^2*(d + e*x)^3*Sqrt[a + b*Log[c*(d + e*x)^n]])/(3*
e^3)

Rule 2211

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/Sqrt[(c_.) + (d_.)*(x_)], x_Symbol] :> Dist[2/d, Subst[Int[F^(g*(e - c*(
f/d)) + f*g*(x^2/d)), x], x, Sqrt[c + d*x]], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2337

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2437

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[(f*(x/d))^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2448

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Int[Exp
andIntegrand[(f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[
e*f - d*g, 0] && IGtQ[q, 0]

Rubi steps

\begin {align*} \int (f+g x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )} \, dx &=\int \left (\frac {(e f-d g)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^2}+\frac {2 g (e f-d g) (d+e x) \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^2}+\frac {g^2 (d+e x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^2}\right ) \, dx\\ &=\frac {g^2 \int (d+e x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )} \, dx}{e^2}+\frac {(2 g (e f-d g)) \int (d+e x) \sqrt {a+b \log \left (c (d+e x)^n\right )} \, dx}{e^2}+\frac {(e f-d g)^2 \int \sqrt {a+b \log \left (c (d+e x)^n\right )} \, dx}{e^2}\\ &=\frac {g^2 \text {Subst}\left (\int x^2 \sqrt {a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{e^3}+\frac {(2 g (e f-d g)) \text {Subst}\left (\int x \sqrt {a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{e^3}+\frac {(e f-d g)^2 \text {Subst}\left (\int \sqrt {a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{e^3}\\ &=\frac {(e f-d g)^2 (d+e x) \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g (e f-d g) (d+e x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g^2 (d+e x)^3 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{3 e^3}-\frac {\left (b g^2 n\right ) \text {Subst}\left (\int \frac {x^2}{\sqrt {a+b \log \left (c x^n\right )}} \, dx,x,d+e x\right )}{6 e^3}-\frac {(b g (e f-d g) n) \text {Subst}\left (\int \frac {x}{\sqrt {a+b \log \left (c x^n\right )}} \, dx,x,d+e x\right )}{2 e^3}-\frac {\left (b (e f-d g)^2 n\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+b \log \left (c x^n\right )}} \, dx,x,d+e x\right )}{2 e^3}\\ &=\frac {(e f-d g)^2 (d+e x) \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g (e f-d g) (d+e x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g^2 (d+e x)^3 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{3 e^3}-\frac {\left (b g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {3 x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{6 e^3}-\frac {\left (b g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{2 e^3}-\frac {\left (b (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{2 e^3}\\ &=\frac {(e f-d g)^2 (d+e x) \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g (e f-d g) (d+e x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g^2 (d+e x)^3 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{3 e^3}-\frac {\left (g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n}\right ) \text {Subst}\left (\int e^{-\frac {3 a}{b n}+\frac {3 x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c (d+e x)^n\right )}\right )}{3 e^3}-\frac {\left (g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \text {Subst}\left (\int e^{-\frac {2 a}{b n}+\frac {2 x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c (d+e x)^n\right )}\right )}{e^3}-\frac {\left ((e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int e^{-\frac {a}{b n}+\frac {x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c (d+e x)^n\right )}\right )}{e^3}\\ &=-\frac {\sqrt {b} e^{-\frac {a}{b n}} (e f-d g)^2 \sqrt {n} \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{2 e^3}-\frac {\sqrt {b} e^{-\frac {2 a}{b n}} g (e f-d g) \sqrt {n} \sqrt {\frac {\pi }{2}} (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{2 e^3}-\frac {\sqrt {b} e^{-\frac {3 a}{b n}} g^2 \sqrt {n} \sqrt {\frac {\pi }{3}} (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{6 e^3}+\frac {(e f-d g)^2 (d+e x) \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g (e f-d g) (d+e x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{e^3}+\frac {g^2 (d+e x)^3 \sqrt {a+b \log \left (c (d+e x)^n\right )}}{3 e^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.35, size = 374, normalized size = 0.93 \begin {gather*} \frac {(d+e x) \left (-18 \sqrt {b} e^{-\frac {a}{b n}} (e f-d g)^2 \sqrt {n} \sqrt {\pi } \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )+9 \sqrt {b} e^{-\frac {2 a}{b n}} g (-e f+d g) \sqrt {n} \sqrt {2 \pi } (d+e x) \left (c (d+e x)^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )-2 \sqrt {b} e^{-\frac {3 a}{b n}} g^2 \sqrt {n} \sqrt {3 \pi } (d+e x)^2 \left (c (d+e x)^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )+36 (e f-d g)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}+36 g (e f-d g) (d+e x) \sqrt {a+b \log \left (c (d+e x)^n\right )}+12 g^2 (d+e x)^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}\right )}{36 e^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x)^2*Sqrt[a + b*Log[c*(d + e*x)^n]],x]

[Out]

((d + e*x)*((-18*Sqrt[b]*(e*f - d*g)^2*Sqrt[n]*Sqrt[Pi]*Erfi[Sqrt[a + b*Log[c*(d + e*x)^n]]/(Sqrt[b]*Sqrt[n])]
)/(E^(a/(b*n))*(c*(d + e*x)^n)^n^(-1)) + (9*Sqrt[b]*g*(-(e*f) + d*g)*Sqrt[n]*Sqrt[2*Pi]*(d + e*x)*Erfi[(Sqrt[2
]*Sqrt[a + b*Log[c*(d + e*x)^n]])/(Sqrt[b]*Sqrt[n])])/(E^((2*a)/(b*n))*(c*(d + e*x)^n)^(2/n)) - (2*Sqrt[b]*g^2
*Sqrt[n]*Sqrt[3*Pi]*(d + e*x)^2*Erfi[(Sqrt[3]*Sqrt[a + b*Log[c*(d + e*x)^n]])/(Sqrt[b]*Sqrt[n])])/(E^((3*a)/(b
*n))*(c*(d + e*x)^n)^(3/n)) + 36*(e*f - d*g)^2*Sqrt[a + b*Log[c*(d + e*x)^n]] + 36*g*(e*f - d*g)*(d + e*x)*Sqr
t[a + b*Log[c*(d + e*x)^n]] + 12*g^2*(d + e*x)^2*Sqrt[a + b*Log[c*(d + e*x)^n]]))/(36*e^3)

________________________________________________________________________________________

Maple [F]
time = 0.13, size = 0, normalized size = 0.00 \[\int \left (g x +f \right )^{2} \sqrt {a +b \ln \left (c \left (e x +d \right )^{n}\right )}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^2*(a+b*ln(c*(e*x+d)^n))^(1/2),x)

[Out]

int((g*x+f)^2*(a+b*ln(c*(e*x+d)^n))^(1/2),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="maxima")

[Out]

integrate((g*x + f)^2*sqrt(b*log((x*e + d)^n*c) + a), x)

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (co
nstant residues)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \log {\left (c \left (d + e x\right )^{n} \right )}} \left (f + g x\right )^{2}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**2*(a+b*ln(c*(e*x+d)**n))**(1/2),x)

[Out]

Integral(sqrt(a + b*log(c*(d + e*x)**n))*(f + g*x)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="giac")

[Out]

integrate((g*x + f)^2*sqrt(b*log((x*e + d)^n*c) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (f+g\,x\right )}^2\,\sqrt {a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f + g*x)^2*(a + b*log(c*(d + e*x)^n))^(1/2),x)

[Out]

int((f + g*x)^2*(a + b*log(c*(d + e*x)^n))^(1/2), x)

________________________________________________________________________________________